<template>
  <div id="ReceiptByOrder">
    <root name="ReceiptByOrder">
      <SafeHeader
        v-bind="{
          title: '按单收货',
          isBack: true,
          fixedTop: true,
        }"
      >
      </SafeHeader>
      <v-tabs fixed-tabs height="40">
        <v-tab class="wms-tab"> 任务 </v-tab>
        <v-tab class="wms-tab"> 收货 </v-tab>
        <!-- 任务页面 -->
        <v-tab-item class="task" transition="slide-y-transition">
          <v-container
            class="my-4 white lighten-5 py-2"
            style="line-height: 1.75rem"
          >
            <!-- <v-row class="mt-0">
              <v-col cols="3" class="py-2 d-flex align-center card-lable">
                <span>入库单号 </span>
              </v-col>
              <v-col class="py-1">
                <v-text-field
                  class="my-0"
                  dense
                  hide-details
                  @keydown.13="taskCodeSearch"
                  v-model="taskFrom.billNo"
                  placeholder="请输入入库单号进行查询"
                >
                </v-text-field>
              </v-col>
            </v-row> -->
            <itemList
              @onEnter="taskCodeSearch"
              itemLabel="入库单号"
              v-model="taskFrom.billNo"
              placeholder="请输入入库单号进行查询"
              type="input"
            ></itemList>
            <v-row class="mt-1">
              <v-col cols="3" class="py-2 card-lable"> 状态 </v-col>
              <!-- <v-col class="py-2 card-value"
                ><v-chip class="ma-0" small>
                  {{ taskFrom.asnState }}
                </v-chip></v-col
              > -->
              <v-col class="py-2 card-value">{{ taskFrom.asnState }}</v-col>
            </v-row>
            <v-row class="mt-1">
              <v-col cols="3" class="py-2 card-lable"> 供应商 </v-col>
              <v-col class="py-2 card-value">{{ taskFrom.supplierName }}</v-col>
            </v-row>
            <v-row class="mt-1">
              <v-col cols="3" class="py-2 card-lable"> 计划时间 </v-col>
              <v-col class="py-2 card-value">{{ taskFrom.expectTime }}</v-col>
            </v-row>
          </v-container>
          <v-container class="task_list white">
            <v-row>
              <v-col
                cols="12"
                class="card-title"
                style="padding-bottom: 8px; padding-top: 8px"
                >入库单明细列表</v-col
              >
            </v-row>
            <v-divider class="mb-2"></v-divider>
            <div v-if="taskFrom.taskList[0]">
              <v-container
                v-for="(item, index) in taskFrom.taskList"
                :key="index"
              >
                <v-row>
                  <v-col cols="12" class="pa-0 pb-2">
                    <v-card outlined style="background-color: #f2f3f5">
                      <v-card-subtitle>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable px-2"
                            >物料编码</v-col
                          >
                          <v-col class="py-1 card-value px-2">{{
                            item.itemCode
                          }}</v-col>
                        </v-row>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >物料名称</v-col
                          >
                          <v-col class="py-1 card-value">{{
                            item.itemName
                          }}</v-col>
                        </v-row>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >计划数量</v-col
                          >
                          <v-col class="py-1 card-value">{{
                            item.expectQuantity
                          }}</v-col>
                        </v-row>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >已收数量</v-col
                          >
                          <v-col class="py-1" style="color: #627aec">{{
                            item.acceptQuantity
                          }}</v-col>
                        </v-row>
                        <v-divider class="mt-3 mb-2"></v-divider>
                        <v-row
                          class="
                            d-flex
                            flex-row
                            justify-space-between
                            align-center
                            pt-1
                          "
                        >
                          <v-col
                            cols="4"
                            class="py-1 px-2"
                            style="color: #323333"
                            >本次收货数量</v-col
                          >
                          <v-col class="py-1 px-2" style="color: #ffc352">
                            {{
                              item.totalReceiptQuantity
                                ? item.totalReceiptQuantity
                                : 0
                            }}</v-col
                          >
                          <v-col cols="3" class="d-flex justify-end py-1">
                            <v-btn
                              rounded
                              small
                              color="#193690"
                              dark
                              @click="taskListReceipt(item)"
                              >收货</v-btn
                            >
                          </v-col>
                        </v-row>
                      </v-card-subtitle>
                    </v-card>
                  </v-col>
                </v-row>
              </v-container>
            </div>

            <v-row v-else>
              <v-col cols="12" class="text-center">暂无数据</v-col>
            </v-row>
          </v-container>
          <v-bottom-navigation
            height="60"
            fixed
            style="background: transparent; box-shadow: none"
          >
            <v-row
              class="pa-0 ma-0 justify-center"
              style="background: transparent"
            >
              <v-col
                cols="12"
                class="pa-0 ma-0 d-flex justify-center align-center mb-2 px-2"
                style="background: transparent"
              >
                <v-btn
                  class="wms-submit-btn"
                  block
                  style="
                    background-color: #193690;
                    height: 100%;
                    border-radius: 10px;
                  "
                  @click="sourceOrderQuery"
                  >源单查询</v-btn
                >
              </v-col>
            </v-row>
          </v-bottom-navigation>
        </v-tab-item>
        <!-- 收货页面 -->
        <v-tab-item transition="slide-y-transition" class="receipt">
          <v-container class="pa-0 mt-4">
            <v-card v-if="!receiptListData.length" outlined>
              <v-card-subtitle class="receiptList pa-0">
                <div>
                  <v-row class="receiptList ma-0"
                    ><v-col class="d-flex justify-center"> 暂无数据 </v-col>
                  </v-row>
                </div>
              </v-card-subtitle>
            </v-card>
            <v-container class="pa-0 px-1" v-else>
              <v-card
                v-for="(item, index) in receiptListData"
                :key="index"
                outlined
                class="mt-4"
              >
                <v-card-title class="v-card-list_title pa-1">
                  <v-row class="ma-0">
                    <v-col
                      cols="8"
                      class="d-flex justify-center flex-column py-1"
                    >
                      <span
                        style="font: 13px !important"
                        class="font-weight-bold"
                        >{{ item.itemName }}</span
                      ><span
                        style="font: 13px !important"
                        class="font-weight-bold"
                        >{{ item.itemCode }}</span
                      >
                    </v-col>
                    <v-col class="d-flex justify-center align-center"
                      ><span
                        style="font: 13px !important"
                        class="font-weight-bold"
                        >{{ taskFrom.asnState }}</span
                      ></v-col
                    >
                  </v-row>
                </v-card-title>
                <v-divider class="my-1"></v-divider>
                <v-card-subtitle class="pa-1">
                  <v-container class="px-2 py-1">
                    <v-row
                      class="ma-0 pa-0 px-1"
                      v-for="(val, i) in item.receiptList"
                      :key="i"
                      style="font-size: 12px"
                    >
                      <v-col cols="7" class="pa-0" style="font: 13px">
                        {{ val.toBoxCode }}
                      </v-col>
                      <v-col
                        cols="2"
                        class="pa-0 text-center"
                        style="font: 13px"
                      >
                        *1
                      </v-col>
                      <v-col cols="3" class="pa-0 text-right" style="font: 13px"
                        >{{ val.toQuantity }}/{{ item.packDescribe }}</v-col
                      ></v-row
                    >
                  </v-container>
                  <v-divider class="my-1"></v-divider>

                  <v-container class="px-2 py-1">
                    <v-row class="ma-0 pa-0 px-1 font-weight-bold">
                      <v-col cols="7" class="pa-0"> 合计 </v-col>
                      <v-col cols="2" class="pa-0 text-center">
                        <span style="color: #f8a73c">{{
                          item.receiptList.length
                        }}</span>
                        箱
                      </v-col>
                      <v-col cols="3" class="text-right pa-0">
                        <span style="color: #f8a73c">{{ sumPack(item) }}</span>
                        {{ item.packDescribe }}
                      </v-col>
                    </v-row>
                  </v-container>
                </v-card-subtitle>
              </v-card>
            </v-container>

            <v-bottom-navigation
              height="60"
              fixed
              style="background: transparent; box-shadow: none"
            >
              <v-row
                class="pa-0 ma-0 justify-center"
                style="background: transparent"
              >
                <v-col
                  cols="12"
                  class="pa-0 ma-0 d-flex justify-center align-center mb-2 px-2"
                  style="background: transparent"
                >
                  <v-btn
                    class="wms-submit-btn"
                    block
                    style="
                      background-color: #193690;
                      height: 100%;
                      border-radius: 10px;
                    "
                    @click="receiptListSubmit"
                    >提交</v-btn
                  >
                </v-col>
              </v-row>
            </v-bottom-navigation>
          </v-container>
        </v-tab-item>
      </v-tabs>
      <!-- 收货弹窗 -->
      <v-dialog v-model="dialog" fullscreen>
        <v-card class="receiptDialog" id="receiptDialog">
          <v-card-title
            class="headline card-title pa-4 font-weight-bold"
            style="height: 78px"
            >收货</v-card-title
          >
          <v-card-subtitle class="d-flex ma-0 pa-0">
            <div style="width: 100%">
              <v-container
                class="pa-0 receiving_heard pb-1"
                style="background: #193690; border-bottom: 1px solid gray"
              >
                <v-row class="py-2">
                  <v-col
                    cols="12"
                    class="
                      d-flex
                      justify-space-around
                      align-center
                      flex-column
                      px-2
                    "
                    style="color: #fff"
                  >
                    <span>{{ oldReceipFrom.itemCode }}</span>
                    <span class="mt-1">{{ oldReceipFrom.itemName }}</span>
                  </v-col>
                </v-row>
                <v-row style="color: #fff">
                  <v-col
                    class="d-flex justify-space-around align-center flex-column"
                  >
                    <span style="font-size: 18px">{{
                      oldReceipFrom.receivedQuantity
                    }}</span>
                    <span style="font-size: 14px" class="mt-1">待收数量</span>
                  </v-col>
                  <v-col
                    class="d-flex justify-space-around align-center flex-column"
                    style="
                      border-left: 1px solid #fff;
                      border-right: 1px solid #fff;
                    "
                  >
                    <span style="color: #f8a73c; font-size: 18px">{{
                      oldReceipFrom.totalReceiptQuantity
                    }}</span>
                    <span style="font-size: 14px" class="mt-1">已收数量</span>
                  </v-col>
                  <v-col
                    class="d-flex justify-space-around align-center flex-column"
                  >
                    <span style="color: #f8a73c; font-size: 18px">2</span>
                    <span style="font-size: 14px" class="mt-1">已收箱数</span>
                  </v-col>
                </v-row>
                <v-row
                  style="border-radius: 4px; background: #fff"
                  class="justify-center align-center mx-2 mt-4"
                >
                  <v-col cols="11" class="py-2">
                    <v-progress-linear
                      :value="oldReceipFrom.totalNum"
                      height="18"
                      color="#F8A73C"
                      background-color="#fff"
                      buffer-value="100"
                      style="border: 1px solid grey; border-radius: 12px"
                    >
                      <strong style="color: #656566"
                        >{{ Math.ceil(oldReceipFrom.totalNum) }}%</strong
                      >
                    </v-progress-linear>
                  </v-col>
                </v-row>
              </v-container>
              <v-container
                class="receiving_bottom mt-6 mb-14 pb-4 px-2"
                style="background: transparent"
              >
                <v-card outlined class="py-4">
                  <v-row class="mt-0">
                    <v-col
                      cols="12"
                      class="py-0 d-flex align-center font-weight-bold"
                      style="font-size: 15px"
                      >容器</v-col
                    >
                    <v-col cols="12" class="py-1">
                      <v-text-field
                        class="my-0 inputPlaceholder"
                        dense
                        hide-details
                        placeholder="请扫描或输入箱码"
                        v-model="receiptDialogFrom.generate"
                      >
                        <template v-slot:append>
                          <v-btn
                            rounded
                            small
                            color="#193690"
                            dark
                            @click="buildContainer"
                            >生成</v-btn
                          ></template
                        >
                      </v-text-field></v-col
                    >
                  </v-row>
                  <v-row class="mt-4">
                    <v-col
                      cols="12"
                      class="py-0 d-flex align-center font-weight-bold"
                      style="font-size: 15px"
                      >收货数量</v-col
                    >
                    <v-col class="py-1">
                      <v-text-field
                        class="my-0 inputPlaceholder"
                        dense
                        type="number"
                        hide-details
                        placeholder="请输入收货数量"
                        v-model="receiptDialogFrom.quantity"
                      ></v-text-field>
                    </v-col>
                  </v-row>
                  <v-row class="mt-4">
                    <v-col
                      cols="12"
                      class="py-0 d-flex align-center font-weight-bold"
                      style="font-size: 15px"
                      >收货库位</v-col
                    >
                    <v-col class="py-1">
                      <v-text-field
                        readonly
                        class="inputPlaceholder"
                        dense
                        hide-details
                        placeholder="请选择收货库位"
                        v-model="receiptDialogFrom.cell"
                      >
                        <template v-slot:append>
                          <v-btn
                            rounded
                            small
                            color="#193690"
                            dark
                            @click="createLocation"
                            >选择</v-btn
                          ></template
                        >
                      </v-text-field></v-col
                    >
                  </v-row>
                </v-card>
              </v-container>
              <v-bottom-navigation
                fixed
                grow
                style="background: transparent; box-shadow: none"
                class="navigationBtns"
              >
                <v-row
                  class="ma-0 justify-space-between px-4 py-2"
                  style="background: inherit"
                >
                  <v-col class="pa-0" cols="3"
                    ><v-btn
                      class="rounded-xl navigationBtns_return"
                      block
                      outlined
                      rounded
                      style="
                        height: 100%;
                        color: #193690 !important;
                        fontcolor: #193690 !important;
                      "
                      @click="dialog = false"
                      >返回</v-btn
                    ></v-col
                  >
                  <v-col class="pa-0" cols="8"
                    ><v-btn
                      class="rounded-xl"
                      block
                      style="height: 100%"
                      color="#193690"
                      @click="receiptDialogClick"
                      >保存</v-btn
                    ></v-col
                  >
                </v-row>
              </v-bottom-navigation>
            </div>
            <v-bottom-sheet v-model="sheet" persistent>
              <v-sheet class="text-center" height="30px">
                <v-btn class="mt-1" text color="red" @click="sheet = !sheet">
                  关闭
                </v-btn>
              </v-sheet>
              <v-list>
                <v-list-item
                  v-for="cell in cellList"
                  :key="cell.cellId"
                  @click="cellSelect(cell)"
                >
                  <v-list-item-title>{{ cell.cellName }}</v-list-item-title>
                </v-list-item>
              </v-list>
            </v-bottom-sheet>
          </v-card-subtitle>
        </v-card>
      </v-dialog>
    </root>
  </div>
</template>

<script>
import Root from "@/components/Root.vue";
import SafeHeader from "@/components/safeHeader_wms.vue";
import wms from "@/utils/business_wms";
import _ from "lodash";
import { apiList } from "@/static/apiList";
import Storage from "@/utils/storage.js";

export default {
  name: "ReceiptByOrder",
  components: {
    Root,
    SafeHeader,
  },
  data() {
    return {
      taskInput: true,
      tab: null,
      dialog: false,
      //   任务标签表单
      taskFrom: {
        billNo: "",
        supplierName: "",
        expectTime: "",
        asnState: "状态",
        //   任务页面列表
        taskList: [],
      },

      //   过渡对象
      oldReceipFrom: {
        // 收货单数据
        receiptList: [],
      },
      //   表单数据
      receiptDialogFrom: {
        quantity: "",
        generate: "",
        cell: "",
      },

      sheet: false,
      //   仓库列表
      cellList: [],

      // cellNum
      generateNum: "",

      // 收货列表
      receiptListData: [],
    };
  },
  methods: {
    // 一种是输入单号进行查询，第二种是通过源单查询带出单号进行查询
    taskCodeSearch() {
      if (!this.taskFrom.billNo) {
        return;
      }
      let params = {
        billNo: this.taskFrom.billNo,
      };
      // 通过接口获取单号数据和列表
      wms
        .get({ url: "/asn/masters/findByBillNo", data: params })
        .then((res) => {
          console.log(res, !_.isEmpty(res.data.data));
          if (
            res.status == 200 &&
            res.data.code == 200 &&
            !_.isEmpty(res.data.data)
          ) {
            let dataObj = res.data.data;
            this.taskInput = true;
            this.taskFrom.supplierName = dataObj.supplierName;
            this.taskFrom.expectTime = dataObj.expectTime;
            apiList["asnStates"].forEach((item) => {
              if (item.value == dataObj.asnState) {
                this.taskFrom.asnState = item.label;
              }
            });
            wms
              .get({ url: "/asn/details/findByBillNo", data: params })
              .then((res) => {
                if (
                  res.status == 200 &&
                  res.data.code == 200 &&
                  !_.isEmpty(res.data.data)
                ) {
                  let dataList = res.data.data.list;
                  // this.taskFrom.taskList = [{

                  // }]
                  this.taskFrom.taskList = dataList;
                }
              });
            console.log(res);
          }
        });
    },
    // 收货弹框确定
    receiptDialogClick() {
      // 前台展示
      // 当前收货数量
      if (!this.oldReceipFrom.totalReceiptQuantity) {
        this.oldReceipFrom.totalReceiptQuantity = 0;
      }
      // 本次收货数量
      this.oldReceipFrom.totalReceiptQuantity +=
        +this.receiptDialogFrom.quantity;
      // 当前收货数量
      this.oldReceipFrom.currentReceiptQuantity =
        this.receiptDialogFrom.quantity;
      // 进度条
      this.progressBar();
      // 当前箱号
      this.oldReceipFrom.generate = this.receiptDialogFrom.generate;
      // 待收数量
      this.oldReceipFrom.receivedQuantity =
        this.oldReceipFrom.expectQuantity -
        this.oldReceipFrom.acceptQuantity -
        (this.oldReceipFrom.totalReceiptQuantity
          ? this.oldReceipFrom.totalReceiptQuantity
          : 0);

      // 传后台
      // 当前收货数量
      let data = {
        toQuantity: this.receiptDialogFrom.quantity, // 每次收货数量
        toBoxCode: this.receiptDialogFrom.generate, // 每次收货箱号
        isOperByPda: true,
        toCellCode: this.receiptDialogFrom.cellCode, // 每次收货仓库号
        wareId: Storage.getObject("loginConfig").wareIds[0],
        wareName: Storage.getObject("loginConfig").wareNames[0],
        asnBillNo: this.oldReceipFrom.billNo,
        asnDetailNo: this.oldReceipFrom.detailNo,
      };
      apiList["asnBillType"].forEach((item) => {
        if (item.label === "ASN收货") {
          data.billType = item.value;
        }
      });
      // 将每次操作push进数组
      // 判断提交数组中物料编码是否相同，相同就在其数组中push 否则就新增对象

      this.oldReceipFrom.receiptList.push(data);
      this.oldReceipFrom.generateNum = this.oldReceipFrom.receiptList.length;

      // 重置表单
      for (let i in this.receiptDialogFrom) {
        console.log(i);
        this.receiptDialogFrom[i] = "";
      }

      if (!this.receiptListData.length) {
        this.receiptListData.push(this.oldReceipFrom);
      } else {
        let indexDD;
        indexDD = _.findIndex(this.receiptListData, (item) => {
          item.itemCode === this.oldReceipFrom.itemCode;
        });
        // this.receiptListData.filter((item) => {
        //   return item.itemCode === this.oldReceipFrom.itemCode;
        // });
        if (indexDD == -1) {
          this.receiptListData.push(this.oldReceipFrom);
        } else {
          this.receiptListData[indexDD] = this.oldReceipFrom;
        }
      }
      console.log(this.receiptListData, this.oldReceipFrom);
    },
    // 打开收货框
    taskListReceipt(item) {
      item.receiptList = item.receiptList ? item.receiptList : [];
      this.receiptDialogFrom = Object.assign(
        {},
        { quantity: "", generate: "" }
      );
      this.oldReceipFrom = item;
      this.dialog = true;
      if (
        this.oldReceipFrom.acceptQuantity > this.oldReceipFrom.expectQuantity
      ) {
      }
      // 待收数量
      this.oldReceipFrom.receivedQuantity =
        this.oldReceipFrom.expectQuantity -
        this.oldReceipFrom.acceptQuantity -
        (this.oldReceipFrom.totalReceiptQuantity
          ? this.oldReceipFrom.totalReceiptQuantity
          : 0);
      this.progressBar();
    },

    // 计算进度条
    progressBar() {
      if (!this.oldReceipFrom.totalReceiptQuantity) {
        this.oldReceipFrom.totalReceiptQuantity = 0;
      }
      this.oldReceipFrom.totalQuantity =
        +this.oldReceipFrom.acceptQuantity +
        +this.oldReceipFrom.totalReceiptQuantity;
      console.log(
        112233,
        this.oldReceipFrom.totalQuantity,
        this.oldReceipFrom.totalReceiptQuantity,
        this.oldReceipFrom.acceptQuantity
      );
      this.oldReceipFrom.totalNum = Math.floor(
        (this.oldReceipFrom.totalQuantity / this.oldReceipFrom.expectQuantity) *
          100
      );
      console.log("-------------------", this.oldReceipFrom.totalNum);
    },

    // 生成容器
    buildContainer() {
      let generateType = apiList.codeRule["box"];
      wms
        .get({ url: "/box/infos/generate", data: { boxType: generateType } })
        .then((res) => {
          console.log(res);
          if (res.status == 200 && res.data.code == 200) {
            this.receiptDialogFrom.generate = res.data.data;
          }
        });
    },
    // 生成库位
    createLocation() {
      console.log("生成库位");
      wms
        .get({
          url: "/cell/infos/findByCellUserTypes",
          data: { wareId: 284, cellUseTypes: 0 },
        })
        .then((res) => {
          if (res.status == 200 && res.data.code == 200) {
            this.cellList = res.data.data.list;
            this.sheet = true;
          }
        });
    },
    // 选择库位
    cellSelect(cell) {
      console.log(cell);
      this.receiptDialogFrom.cell = cell.cellCode;
      Storage.setItem("cell", cell.cellCode);
      this.sheet = false;
    },
    // 收货单提交
    receiptListSubmit() {
      let acceptInserts = [];
      console.log(this.receiptList);
      this.receiptList.forEach((item) => {
        acceptInserts = acceptInserts.concat(item.receiptList);
        console.log(acceptInserts);
      });
      // let acceptInserts = this.receiptList;
      console.log(acceptInserts);

      wms
        .post({
          url: "/accept/records/acceptList",
          data: { acceptInserts: acceptInserts },
        })
        .then((res) => {
          if (res.status == 200 && res.data.code == 200) {
            this.receiptList = [];
            this.taskCodeSearch();
          }
          console.log(res);
        });
    },
    // 源单查询
    sourceOrderQuery() {
      if (window.navigator.userAgent.toLowerCase().includes("apicloud")) {
        window.api.openWin({
          name: "WarehouseOrderList",
          url: "./WarehouseOrderList.html",
        });
      } else {
        this.$root.api.api.openWin({
          name: "WarehouseOrderList",
          url: "./WarehouseOrderList.html",
        });
      }
    },
    sumPack(item) {
      let sunValue = 0;
      console.log(
        item.receiptList.forEach((val) => {
          sunValue += +(val.toQuantity ? val.toQuantity : 0);
        })
      );
      return sunValue;
    },
  },
  mounted() {
    let pageParam;

    if (window.navigator.userAgent.toLowerCase().includes("apicloud")) {
      pageParam = window.api.pageParam;
      this.taskFrom.billNo = pageParam.billNo;
      this.taskCodeSearch();
      window.api.addEventListener(
        {
          name: "ReceiptByOrder",
        },
        (res) => {
          console.log(res.value.billNo);
          this.taskFrom.billNo = res.value.billNo;
          this.taskCodeSearch();
        }
      );
    } else {
      pageParam = this.$root.api.api.pageParam;
      this.taskFrom.billNo = pageParam.billNo;
      this.taskCodeSearch();
      this.$root.api.api.addEventListener(
        {
          name: "ReceiptByOrder",
        },
        (res) => {
          console.log(res.value.billNo);
          this.taskFrom.billNo = res.value.billNo;
          this.taskCodeSearch();
        }
      );
    }
  },
};
</script>

<style lang="sass" scoped>
.v-tabs
  height: 100%
  background-color: transparent
  ::v-deep.v-tabs-items
    background-color: transparent

.receiptList
  .receiptList_detail
    padding: 8px
    min-height: 5rem
    .col
      padding: 2px
      min-height: 1rem
      text-align: right

    .row
      margin: 0
  ::v-deep.receiptList_expansion_panel
    .v-expansion-panel-content__wrap
      padding: 0 0 8px 0
.task
  padding-bottom: 56px
  &_from
    background-color: #fff
    margin-bottom: 6px
    // .v-sheet.v-card
    //   border-radius: 10px
    //   .v-card__subtitle
    //     padding: 6px
    .v-text-field
      ::v-deep.v-input__prepend-inner
        margin-top: 8px
        display: flex
        font-size: 0.875rem
        min-width: 4rem
        .v-input__append-inner
          .v-btn
            padding: 0 10px
            margin-bottom: 2px

            .col
              padding-bottom: 6px

  &_list
    // background-color: #fff
    .v-card__subtitle
      .row + .row
        margin-top: 6px
        justify-content: flex-end
        padding-right: 10px

        .col
          padding: 6px 8px

#receiptDialog
  background-color: #F2F3F5 !important

  .headline
    background-color: #193690
    color: #fff
    justify-content: center
    font-size: 18px !important
    line-height: 1.75
    padding: 40px 12px 8px 12px !important

  .v-card__subtitle
    display: flex
    margin: 0
    padding-bottom: 56px
    .row
      margin: 0
      background-color: #fff
      .col
        min-height: 1rem
        padding: 8px
    .receiving_heard
      border-top: 1px solid grey
      font-size: 16px
      font-weight: bold
      .row
        background-color: inherit

  .v-card__text
    padding: 0 10px !important
    .row
      margin: 0
      .col
        padding: 8px
        ::v-deep.v-input__prepend-outer
          min-width: 2rem
          margin-top: 10px
  ::v-deep.navigationBtns
    .navigationBtns_return
      .v-btn__content
        color: #193690

::v-deep.v-bottom-navigation
  .v-btn__content
    color: #fff
    font-size: 1rem

.inputPlaceholder
  ::v-deep.v-text-field__slot
    input::-webkit-input-placeholder
      font-size: 15px
    input::-moz-placeholder
      font-size: 15px
    input:-moz-placeholder
      font-size: 15px
    input:-ms-input-placeholder
      font-size: 15px
.receipt
  padding-bottom: 56px
  .v-card-list_title
    font-size: 14px !important
</style>